package com.river.boot.biz.model.form;

import java.io.Serial;
import java.io.Serializable;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.math.BigDecimal;
import java.util.List;

import jakarta.validation.constraints.*;

/**
 * 菜品表单对象
 *
 * @author JiangCheng Xiang
 * @since 2025-04-24 21:04
 */
@Getter
@Setter
@Schema(description = "菜品表单对象")
public class ProductForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "菜品ID")
    private Long id;

    @Schema(description = "店铺ID")
    @NotNull(message = "店铺ID不能为空")
    private Long shopId;

    @Schema(description = "分类ID")
    @NotNull(message = "分类ID不能为空")
    private Long categoryId;

    @Schema(description = "菜品名称")
    @NotBlank(message = "菜品名称不能为空")
    @Size(max = 100, message = "菜品名称长度不能超过100个字符")
    private String name;

    @Schema(description = "菜品描述")
    @Size(max = 65535, message = "菜品描述长度不能超过65535个字符")
    private String description;

    @Schema(description = "主图")
    @NotBlank(message = "主图不能为空")
    @Size(max = 255, message = "主图长度不能超过255个字符")
    private String mainImage;

    @Schema(description = "多图")
    private List<String> imageList;

    @Schema(description = "现价")
    @NotNull(message = "现价不能为空")
    private BigDecimal price;

    @Schema(description = "原价")
    private BigDecimal originalPrice;

    @Schema(description = "成本价")
    private BigDecimal costPrice;

    @Schema(description = "库存(-1表示无限)")
    private Integer stock;

    @Schema(description = "销量")
    private Integer sales;

    @Schema(description = "标签数组['招牌','辣']")
    private List<String> tags;

    @Schema(description = "排序权重")
    private Integer sort;

    @Schema(description = "状态：1-上架 0-下架")
    private Integer status;
}
